Code Refactoring for authentication, presentations