Adjusted version, and added timeout for ajax calls on android (results in 401 now)