Finish log in and log out