Add session code to application controller.