Extract Badge login from controller in factories. Yay sanity