Finished first stage with Logout functionality