Adding diagnostic macros, service for showing alerts, and handling errors from the login controller.