Implemented cookies to keep users logged in