finish user login and login_out