Code Refactoring
Save Timestamp with date in dateTime fields of all table,
Update lastLogin date every time user logins.
Use Hibernate Queries instead of manually creating JDBC connection