minor fixes in change password
CloseableManageradded to close em manager when operations are done. And minor cleanup