restructure the code in test_login_admin to use new heritage and the code pass pep8