Added login controls and check