finished sign in and out functionality