Basic oauth breaks because of _check_login function error #296