Title: Theme causing login failure
Last modified: August 21, 2016

---

# Theme causing login failure

 *  Resolved [Suzanne](https://wordpress.org/support/users/ahjira/)
 * (@ahjira)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/theme-causing-login-failure/)
 * Hi there. I’m trying to get this working. My custom theme seems to be the issue.
   When attempting to login, I always get ERROR or if you try to register someone,
   you get ERROR. I turned off all other plugins, that wasn’t it. I switched themes,
   THAT was it. But I have no idea where to start looking for this issue. I’m hoping
   maybe you’d have an idea what a theme could be doing that would prevent a login/
   registration. I don’t see this issue with other login widgets – every other login
   plugin I’ve tried works – so it has to be something very unique that this one
   does.
 * Any ideas about might be suspect would help. Thanks
 * [http://wordpress.org/plugins/sexy-login/](http://wordpress.org/plugins/sexy-login/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Suzanne](https://wordpress.org/support/users/ahjira/)
 * (@ahjira)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/theme-causing-login-failure/#post-4063318)
 * Nevermind I figured it out but for anyone else getting the generic ERROR message
   when attempting to login, here one reason why that might happen…
 * I have a function running that prevents users from viewing the back end:
 *     ```
       add_action('admin_init', 'restrict_access_admin_panel', 1);
       function restrict_access_admin_panel(){
         global $current_user;
         get_currentuserinfo();
         if ($current_user->user_level <  4) {
           wp_redirect( get_bloginfo('url') );
           exit;
         }
       }
       ```
   
 * This was causing the issue, probably because of the redirect? I’m not sure.

Viewing 1 replies (of 1 total)

The topic ‘Theme causing login failure’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sexy-login.svg)
 * [Sexy Login](https://wordpress.org/plugins/sexy-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sexy-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sexy-login/)
 * [Active Topics](https://wordpress.org/support/plugin/sexy-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sexy-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sexy-login/reviews/)

## Tags

 * [login](https://wordpress.org/support/topic-tag/login/)

 * 1 reply
 * 1 participant
 * Last reply from: [Suzanne](https://wordpress.org/support/users/ahjira/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/theme-causing-login-failure/#post-4063318)
 * Status: resolved