Fixed user checking on DB