added layout classes and added helper methods and authentication method