Cleaned log in up a bit and stored security token in a cookie