login and registration debugged