implementing auths functions