Controller sessions

Added authentication method and logic.