Restored authentication functionality and fixed crashing in exerciseentry.ejs