implented authentication in ui