added loader and fixed scope issues for login button