finish the login process logically