loggin script controller