changed log-in and log-out system