re-usable context at the authorize endpoint
updated version
fixed the time check