More work on the login/register page

Error checking, validation and popovers. Added lower case index to usernames and made a few changes in the layout.