Fixing some bugs with ui calling server and server sending bad
credential exception instead of proper message