fixed a bug where incorrect call to complete oauth2 login caused an exception