half login function
half login function