added login bar function