How to validate user with the password they have submitted earlier?