Fixed connection handling and error response when authentication fails or user is not found.
Merge branch 'develop' of github.com:/structr/structr into develop