refactoring login() with the new secret api endpoint i found

^O^