database changed  login logic added