Implemented password encoder. Added REST for checking username unique.