login handling added