debugging login function #1