Login to use PATS function