Finish logging in and logging out