Move security/login logic to a separate controller