login and db connection fixed