Moved login to its own header file