Added authentication using passportjs instead of custom code