changed UserLoginHistory.type to a string