Fixed login and registration