Adding signin and signout functionality as well as cookies