login activity + fixes in php