added some db related for easy usage
added error display
added user to login