refactoring twitter login provider