finish the login reg logout