added login route and some plumbing for socket