Use 2 concurrent promises to do two concurrent AJAX calls

Load the home screen faster by sending two AJAX calls concurrently
using jquery promises.

Also fix the login screen so that it doesn't pop up and then disappear
when reloading the page.

Fixes #3