Is it not possible to handle the 302 redirect the OAuth server will return? Doing it with a hard coded timer seems like a temporary solution