Moved user login event handler to the user class