simplifying loggin