implementing standard json response for auth views