Added initiate function to keep a user logged in based on the cookie authentication key