refactored login removed debugging prints