Enforce authentication and implement registration