Title: Javascript Error on Login Page
Last modified: August 19, 2016

---

# Javascript Error on Login Page

 *  Resolved [firewalker](https://wordpress.org/support/users/firewalker/)
 * (@firewalker)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-login-page/)
 * Found Javascript Error when accessing wp-login.php: “ReferenceError: Can’t find
   variable: isUserLoggedIn”
 * Resolved by adding:
    `add_action( 'login_head', array( 'P2JS', 'print_options'));`
   After this line: `add_action( 'wp_head', array( 'P2JS', 'print_options' ) );`

Viewing 1 replies (of 1 total)

 *  [lucasajackson](https://wordpress.org/support/users/lucasajackson/)
 * (@lucasajackson)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-login-page/#post-1971621)
 * I am having an issue with the P2 theme. I can’t post anything. I am logged in
   to WordPress. Every time I try to I get an error telling me that I need to login
   again, and it redirects me to the login page for WordPress.
 * Anyway, I found this post by searching for a js error I got in FireBug when I
   was trouble shooting the issue. i thought maybe you would have some insight as
   to why this is happening. I tried adding `add_action( 'login_head', array( 'P2JS','
   print_options' ) );` to my p2 theme’s js file, but it didn’t work.
 * The link to the post where I have been documenting all of my troubleshooting 
   steps is:
    [ Here ](http://wordpress.org/support/topic/please-login?replies=6#post-2026160)
 * Thank you

Viewing 1 replies (of 1 total)

The topic ‘Javascript Error on Login Page’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [lucasajackson](https://wordpress.org/support/users/lucasajackson/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-on-login-page/#post-1971621)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
