tweaking jquery to get redirect to login happening asynchronously if user not logged in when accessing video page