implement sign in and logout functionality