implemented cookies for saving username