Added error handling 500 and 404. Also logout support.