Fixed bug where wrong login info would cause a server error.
Fixed logout link.