added authentication, signin/signout functions