updating application controller

Handle OPTIONS request header, validate the requested user by authtoken