To call an activity before login, the activity should be part of Unauthencated access group. And it should have “Allow direct invocation from the client” setting checked and “Require authentication to run” setting unchecked.
@Lekha Similar to login button, you can write a jsp tag to call an activity pyName=your activity name and on click of your button. Get attribute of your button and onclick funtion call your activity