adds cookie at login