replacing firstordefault by first
Add methods for HttpContext
Fixing old auth function with new ones