Completed sign in/sign out functionality