Fixed session lacking issue in application controller