Added sign in, sign up and sign out functions.