Added logging in and logging out