Implement better authorization