finish user login and register