Implementing user sign in and sign out