linked login code with gui