How to check records if a user is already registered?