added filter for json and handling of login-error