Completed User Authentication Functionality.
Fixed bugs related to db connection.