register logic
login now with database hibnerate