Fixed error reporting for auth errors and removed "?" in url showing up