Correct server response to login and redirect. Closed issue #38