Fixed client registration error. Started including of spring security in project. Created spring-security.xml and changed web.xml.