authentication system as per Raven implemented and fixed with re-directs