hibernate configurations and login example