Errors fixing

fixing error in security and authentication