Updated login with JPA, not using hibernate from now on. still buggy