30OCT2013 Add error judgement for login and register