Fixed login, improved registration