moved currentUser storage to cookie from localStorage