Implemented databased spring security, and cleaned a little