proper log in, set cookie to user id