added user credentials check if blank, and auto redirect after registration