login and register implemented