added variable to switch between get/post request for logon on ap, default: get request