loginfragment refactors