Fixed #65 Display an error when credentials are invalid

Change-Id: Iddbb2b9213424d425322c898d830841d65761f0a