Log-in mechanism using spring security and mysql