add blocks, handle all exceptions from xhr calls, and login