Main app template, handling users and authorisation