making login safe for https
making safe for https