Debugging login function