session error handling
added helper methods to controllers