Refactored User Login code, more user Login/Logout tests