code now refactoed to login from a link rather than form post and will close the pop window automatically. Also added short instructions