Added null check in apilogin. Added redirect for non existing tasks.