Fixed 'undefined[0] error on bad login