login mechanism worked out