finished sign-in functionality, using cookies.