added the js file of to manage routing of session.
changed the routing 'account' to 'user'.
implemented cors and csrf protection.