Fix implementation for user login