login and register bugs fixed