Added some fixes to the user credentials settings

...y and added error catching for incorrect user credentials