Finish Login and Logout