Changed passport middleware to allow redirect to previous URL once logged in