added authorization/authentication functionality