It will work...
But to check in login credentials, what are you doing at present?
Isn't it queries the DB for authentication..