Added edit view, fixed cookie reset randomly, session data is now stored in database