beginnings of user login system, basically all of the registration/login working except need session id added to user document and output to response as a cookie.