OMG i've done it...............sleeeps for a week.....
I ran a var_dump() on the password variable just after using the sha1() function, ready for the query to match the user and pass, it was returning:
I looked at the table and it was 8 or 9 characters short....Deleted user, re-registered and correct amount of characters were there and it let me login.....
About 100 hours, 50 coffees, 50 cigs, sleep deprivation and the biggest pain in my * which php has thrown my way so far....a simple var_dump() could have resolved this. I should have counted every character when comparing them before, I just went off the first 5-6 and then thought it must match.....
I feel ill after this, I thought i'd never sort it. I'm surpised I have hair I really am, I was so close to just giving up!
Thanks so much for the help and all your tips and ideas.