refactored auth
fixed syntax errors on auth