reformatted on spring security, bound with database