Moving authentication methods to their own file