Redirect to main domain, if teacher doesn't exist.

Also added a custom UrlParser, to be able to rewrite the url.
Replace GWT RPC with Restlet on the server and RequestBuilder on the client.