Basic oauth breaks because of _check_login function error #296

Issue #296