Cookie handling. Authorising application internally