Implemeting logging in and setting cookie HW6.5