fixed logged in timeout by implementing proper authentication check.